package com.notes.log;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author tiny
 * @date 2022/3/12 23:17
 * @Description:
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class LogObject {

    /**
     * 事件名称 即业务方法名
     */
    @JsonProperty(index = 1)
    private String eventName;

    /**
     * 调用链id
     */
    @JsonProperty(index = 2)
    private String traceId;

    /**
     * 结果消息
     */
    @JsonProperty(index = 3)
    private String msg;

    /**
     * 接口响应时间
     */
    @JsonProperty(index = 4)
    private Long costTime;

    /**
     * C端用户id
     */
    @JsonProperty(index = 5)
    private Integer userId;

    /**
     * 其他业务参数
     */
    @JsonProperty(index = 6)
    private Object others;

    /**
     * 接口请求入参
     */
    @JsonProperty(index = 7)
    private Object request;

    /**
     * 接口返回值
     */
    @JsonProperty(index = 8)
    private Object response;
}
